{% extends "home.htm" %}
		{% block title %}
			RICERCA RICETTA
		{% endblock %}		

		{% block content %}
<script type="text/javascript">
    <!--
    function verify(id)
    {
        if(isNaN(id.value))
        {
             alert(id.name+' deve essere un numero !!');
             id.value='';
         }
    }
    -->
</script>
<h2>Ricerca ricette</h2>
		<form name="ricerca_ricetta" action="." method="Post">
			<table>
				<tr>  
					<td> 
						Parola chiave
					</td>
					<td> 
						<input type="text" name="parola_chiave">
					</td>
				</tr>	
				<tr>
					<td>
						Area Geografica
					</td>
					<td>
						<select name="cucina">
                            <option value="0">Tutte</option>
                            {% for i in cuisine %}
                                <option value="{{ i.id }}">{{ i.name }}</option>
                            {% endfor %}
						</select>			
				</tr>
				<tr>  
					<td> 
						Categoria
					</td>
					<td> 
						<select name="categoria">
                            <option value="0">Tutte</option>
							{% for i in category %}
                                <option value="{{ i.id }}">{{ i.name }}</option>
                            {% endfor %}
						</select>
					</td>
				</tr>
                <tr>  
					<td> 
						Stagione
					</td>
					<td> 
						<select name="stagione">
                            <option value="0">Tutte</option>
							{% for i in season %}
                                <option value="{{ i.id }}">{{ i.name }}</option>
                            {% endfor %}
						</select>
					</td>
				</tr>
				<tr>  
					<td valign="top"> 
						Tempo di preparazione
					</td>
					<td>
                        <input type="radio" name="tempo" value="0" checked> Any<br>
                        <input type="radio" name="tempo" value="15"> Fino a 15 minuti<br>
						<input type="radio" name="tempo" value="30"> Fino a 30 minuti<br>
						<input type="radio" name="tempo" value="45"> Fino a 45 minuti<br>
						<input type="radio" name="tempo" value="60"> Fino a 60 minuti<br>
						<input type="radio" name="tempo" value="61"> Oltre 60 minuti
					</td>
				</tr>
					<td> 
						Facilita
					</td>
					<td>
                        Any <input type="radio" name="difficolta" value="0" checked>
						Fino a <input type="radio" name="difficolta" value="1"> 1 
                         <input type="radio" name="difficolta" value="2"> 2 
                         <input type="radio" name="difficolta" value="3"> 3 
                         <input type="radio" name="difficolta" value="4"> 4 
                         <input type="radio" name="difficolta" value="5"> 5 
					</td>
				</tr>
				<tr>  
					<td> 
						Calorie
					</td>
					<td>
						Fino a
						<input type="text" name="calorie" onChange="verify(document.forms['ricerca_ricetta'].calorie)">
					</td>
				</tr>
				<tr>  
					<td> 
						Vino Consigliato
					</td>
					<td> 
						<input type="text" name="vino">
					</td>
				</tr>				
				<tr>  
					<td colspan="2" align="center"> 
						<input id="button" type="submit" value="Trova Ricetta">
						<input id="button" type="reset" value="Azzera Campi">
					</td>
				</tr>				
			</table>
		</form>
		{% endblock %}
